package com.lagou.demo.controller;

import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.Security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@LagouController
public class TestController {

    @Security({"liming", "lisi"})
    @LagouRequestMapping("/handle01")
    public void handle01(HttpServletRequest request, HttpServletResponse response, String username) throws IOException {
        response.getWriter().write("Welcome aboard: "+username);
    }

    @Security({"zhangsan", "lisi"})
    @LagouRequestMapping("/handle02")
    public void handle02(HttpServletRequest request, HttpServletResponse response,String username) throws IOException {
        response.getWriter().write("Welcome aboard: "+username);
    }
}
